﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using Services;
using Helper;
namespace ActionServices
{

    public interface IReceipt_VoucherFeeActionService:BaseActionService
    {
        long Save(object _model);
        IList<CoreData.Receipt_VoucherFee> GetListByLINQ(Func<CoreData.Receipt_VoucherFee, Boolean> _where);
        CoreData.Receipt_VoucherFee GetOneByLINQ(Func<CoreData.Receipt_VoucherFee, Boolean> _where);
        bool Delete(object _model);
        Receipt_VoucherFee GetByVoucherID(long voucherid);
        IList<Receipt_VoucherFee> GetByStudentID(long studentid);
        string CalMoneyDebt(long studentID, string type);
          /// <summary>
        /// Sử dụng để lấy phieu thu là đóng phí bảo lưu
        /// </summary>
        /// <param name="StudentID"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Receipt_VoucherFee GetByVoucherFeeSave(long StudentID);
        IList<OverPayInfo> GetListStudentPayOverBalance();
    }

    public partial class Receipt_VoucherFeeActionService:IReceipt_VoucherFeeActionService
    {
       Receipt_VoucherFeeService Service;

       public Receipt_VoucherFeeActionService()
       {
           Service = new Receipt_VoucherFeeService();
       }

       #region Main Method

       public virtual long Save(object _model)
       {
           return Service.Save(_model);
       }

       public virtual object GetByID(long _id)
       {
           return Service.GetByID(_id);
       }

       public virtual object GetList()
       {
           return Service.GetList();
       }

       public virtual IList<CoreData.Receipt_VoucherFee> GetListByLINQ(Func<CoreData.Receipt_VoucherFee, Boolean> _where)
       {
           return Service.GetListByLINQ(_where);
       }

       public virtual CoreData.Receipt_VoucherFee GetOneByLINQ(Func<CoreData.Receipt_VoucherFee, Boolean> _where)
       {
           return Service.GetOneByLINQ(_where);
       }

       public virtual object GetList(string _searchstring)
       {
           return Service.GetList(_searchstring);
       }

       public virtual bool Delete(object _model)
       {
           return Service.Delete(_model);
       }

       #endregion


        #region Other Method


       public virtual Receipt_VoucherFee GetByVoucherID(long voucherid)
       {
           return Service.GetByVoucherID(voucherid);
       }
       public virtual IList<Receipt_VoucherFee> GetByStudentID(long studentid)
       {
           return Service.GetByStudentID(studentid);
       }
       public virtual string CalMoneyDebt(long studentID, string type)
       {
           return Service.CalMoneyDebt(studentID, type);
       }

          /// <summary>
        /// Sử dụng để lấy phieu thu là đóng phí bảo lưu
        /// </summary>
        /// <param name="StudentID"></param>
        /// <param name="type"></param>
        /// <returns></returns>
       public virtual Receipt_VoucherFee GetByVoucherFeeSave(long StudentID)
       {
           return Service.GetByVoucherFeeSave(StudentID);
       }

       public virtual IList<OverPayInfo> GetListStudentPayOverBalance()
       {
           return Service.GetListStudentPayOverBalance();
       }

        #endregion

    }
         
}
